package com.fit.entities.card;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.apache.tapestry5.beaneditor.NonVisual;

import com.fit.entities.coach.Coach;
import com.fit.entities.member.Member;
import com.fit.entities.typeofcard.TypeOfCard;
@Entity
@Table(name="card")
public class Card {

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@NonVisual
	@Column(name="card_id")
	private Long cardId;
	
	
	 @Column(name="price", nullable=false)
	 private double price;
	 
	
	 @Column(name="start_date", nullable=false)
	 private Date startDate;
	 
	 @Column(name="end_date", nullable=false)
	 private Date endDate;
	 
	 @ManyToOne(optional = true)
		@JoinColumn(name = "card_type_id")
		private TypeOfCard cardType_id;
	 
	 @ManyToOne(optional = true)
		@JoinColumn(name = "member_id")
		private Member memberID;
	 
	 @ManyToOne(optional = true)
		@JoinColumn(name = "coach_jmbg")
		private Coach coachJMBG;
	 

	public Member getMemberID() {
		return memberID;
	}

	public void setMemberID(Member memberID) {
		this.memberID = memberID;
	}

	public Coach getCoachJMBG() {
		return coachJMBG;
	}

	public void setCoachJMBG(Coach coachJMBG) {
		this.coachJMBG = coachJMBG;
	}

	public TypeOfCard getCardType_id() {
		return cardType_id;
	}

	public void setCardType_id(TypeOfCard cardType_id) {
		this.cardType_id = cardType_id;
	}

	public Long getCardId() {
		return cardId;
	}

	public void setCardId(Long cardId) {
		this.cardId = cardId;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	 
	 
	 
}
